/*
    SUSAN® - Sole of Unix Save ANything

      Copyright (C) 2011-2016 Skyatlas Co. LTD

   

   
*/

#ifndef BAREOS_LIB_MESSAGE_LEVEL_H_
#define BAREOS_LIB_MESSAGE_LEVEL_H_

#undef M_DEBUG
#undef M_ABORT
#undef M_FATAL
#undef M_ERROR
#undef M_WARNING
#undef M_INFO
#undef M_MOUNT
#undef M_ERROR_TERM
#undef M_TERM
#undef M_RESTORED
#undef M_SECURITY
#undef M_ALERT
#undef M_VOLMGMT
#undef M_AUDIT

/**
 * Most of these message levels are more or less obvious.
 * They have evolved somewhat during the development of BAREOS,
 * and here are some of the details of where I am trying to
 * head (in the process of changing the code) as of 15 June 2002.
 *
 * M_ABORT       BAREOS immediately aborts and tries to produce a traceback
 *               This is for really serious errors like segmentation fault.
 * M_ERROR_TERM  BAREOS immediately terminates but no dump. This is for
 *               "obvious" serious errors like daemon already running or
 *               cannot open critical file, ... where a dump is not wanted.
 * M_TERM        BAREOS daemon shutting down because of request (SIGTERM).
 * M_DEBUG       Debug Messages
 *
 * The remaining apply to Jobs rather than the daemon.
 *
 * M_FATAL       BAREOS detected a fatal Job error. The Job will be killed,
 *               but BAREOS continues running.
 * M_ERROR       BAREOS detected a Job error. The Job will continue running
 *               but the termination status will be error.
 * M_WARNING     Job warning message.
 * M_INFO        Job information message.
 * M_SAVED       Info on saved file
 * M_NOTSAVED    Info on not saved file
 * M_RESTORED    An ls -l of each restored file.
 * M_SKIPPED     File skipped during backup by option setting
 * M_SECURITY    For security viloations. This is equivalent to FATAL.
 * M_ALERT       For Tape Alert messages.
 * M_VOLMGMT     Volume Management message
 * M_AUDIT       Auditing message
 * M_MOUNT       Mount requests
 */
enum
{
  /*
   * Keep M_ABORT=1 for dlist.h
   */
  M_ABORT = 1,
  M_DEBUG,
  M_FATAL,
  M_ERROR,
  M_WARNING,
  M_INFO,
  M_SAVED,
  M_NOTSAVED,
  M_SKIPPED,
  M_MOUNT,
  M_ERROR_TERM,
  M_TERM,
  M_RESTORED,
  M_SECURITY,
  M_ALERT,
  M_VOLMGMT,
  M_AUDIT
};

#define M_MAX M_AUDIT /* keep this updated ! */
#define NR_MSG_TYPES NbytesForBits(M_MAX + 1)

#endif  // BAREOS_LIB_MESSAGE_LEVEL_H_
